﻿<%@ Page Language="vb" ValidateRequest="false" MasterPageFile="Admin.Master" AutoEventWireup="false" CodeBehind="PageManager.aspx.vb" Inherits="MeoTom.Web.Blog.PageManager" Title="Edit Pages &lsaquo; Meo Tom's Blog" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ctph" Runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
        <div style="float:left;width:100%;">
            <div id="iconPage" class="icon32"><br /></div>
            <h2>Edit Posts</h2>
        </div>
        <asp:UpdateProgress ID="UpdateProgress1" runat="server">
            <ProgressTemplate>
                <div class="lblLoading">Loading...</div>
            </ProgressTemplate>
        </asp:UpdateProgress>
        <div class="form-wrap" style="float:left;width:98%;margin-right:20px;">
            <select name="selectedAction0">
                <option value="0">Action</option>
                <option value="1">-- Edit</option>
                <option value="2">-- Delete</option>
            </select>
            <asp:Button ID="btnApply" CssClass="button" runat="server" Width="60" Text="Apply" />&nbsp;&nbsp;
            <asp:GridView ID="grdListPages" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
                DataKeyNames="PageID" PageSize="15" EmptyDataText="No posts found" CssClass="tblMain" style="border-collapse:separate;" border="0">
                <Columns>
                    <asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" HeaderText="&lt;input type=&quot;checkbox&quot; name=&quot;cboCheck&quot; onfocus=&quot;this.blur();&quot; onclick=&quot;Util.CheckAll(document.aspnetForm.cboCheckArticle);&quot; />">
                        <ItemTemplate>
                            <input type="checkbox" onfocus="this.blur();" name="cboCheckArticle" value="<%#Eval("PageID")%>" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Post" ItemStyle-Width="70%">
                        <ItemTemplate>
                            <div onmouseover="javascript:Util.DisplayPostAction('PostAction_<%#Eval("PageID")%>');" onmouseout="javascript:Util.HidePostAction('PostAction_<%#Eval("PageID")%>');" style="height:32px;">
                                <a class="lnkArticle" href="PageUpdate.aspx?ID=<%#Eval("PageID")%>"><%#Eval("PageTitle")%></a><%#DisplayStatus(Eval("Status"))%>
                                <div class="PostAction" style="display:none;" id="PostAction_<%#Eval("PageID")%>"><a href="ArticleUpdate.aspx?action=Edit&ID=<%#Eval("PageID")%>" title="Edit this Post">Edit</a>&nbsp;|&nbsp;<a href="PageManager.aspx?action=Delete&ID=<%#Eval("PageID")%>" title="Delete this Page" onclick="javascript:return Util.ConfirmDeleteArticle('<%# Eval("PageTitle") %>');">Delete</a>&nbsp;|&nbsp;<a href="<%# Left(MeoTom.Core.Configs.HomeUrl,MeoTom.Core.Configs.HomeUrl.Length-1) %><%# Eval("PagePath") %>" title="Preview <%#Eval("PageTitle")%>" target="_blank">Preview</a></div>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="UserName" HeaderText="Author" />
                    <asp:TemplateField HeaderImageUrl="~/images/comment-grey-bubble.png" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <div class="post-com-count-wrapper" style="float:none;">
                                <a class="post-com-count" href="ArticleComment.aspx?action=getByPageID&PageID=<%# Eval("PageID") %>"><span class="comment-count"><%#Eval("TotalComment")%></span></a>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Date">
                        <ItemTemplate>
                            <%#DisplayStatusDate(Eval("Status"), Eval("ReleaseDate").ToString())%>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="header" />
                <PagerSettings Mode="NumericFirstLast" />
                <PagerStyle CssClass="footer" Font-Size="14" />
            </asp:GridView>
            <select name="selectedAction1">
                <option value="0">Action</option>
                <option value="1">-- Edit</option>
                <option value="2">-- Delete</option>
            </select>
            <asp:Button ID="btnApply2" CssClass="button" runat="server" Width="60" Text="Apply" />
        </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <script language="javascript" type="text/javascript">
        Menus.DisplaySubMenu('menu-4-2');
        Menus.ChangeSelectedMenu('menu-4-2');
    </script>    
</asp:Content>